package MP.ASTs;

import MP.CompilationException;
import MP.lexicalanalysis.Token;

public class ForStmtAST extends OneStmtAST {
	public Token		name;
	public ExprAST		e1;
	public ExprAST		e2;
	public boolean		to; //true for TO and false for DOWNTO
	public OneStmtAST	o;
	public ForStmtAST(Token t, ExprAST exp1, ExprAST exp2, boolean bool,OneStmtAST one){
		name=t;
		e1=exp1;
		e2=exp2;
		to=bool; 
		o=one;
		e1.parent = e2.parent = o.parent = this;
	}
	public Object visit(Visitor v, Object o) throws CompilationException{
		return v.visitForStmtAST(this,o);
	}	
}